#!/usr/bin/python3
import re
import os
import shutil
"""
数据脱敏
"""

# files name
lzy = "lzy.py"

# patterns
id = (r'(?<=LANZOU_ID = ").*?(?=")',r"")
psd = (r'(?<=LANZOU_PSD = ").*?(?=")',"")

# lzy
with open(lzy, "r", encoding="utf-8") as f:
    result = re.sub(id[0], id[1], f.read(), count=0, flags=0)
    result = re.sub(psd[0], psd[1], result, count=0, flags=0)
with open(lzy, "w", encoding="utf-8") as f:
    f.write(result)

print("Desensitization finished...")